<!DOCTYPE html>
<html>
    <head>
        <title>avalon.hotkeys</title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script src="../avalon.js" type="text/javascript"></script>
        <style>
            #aaa textarea{
                width:400px;
                height:200px;
                border:1px solid red;
            }
        </style>
        <script>
            require(["hotkeys/avalon.hotkeys"], function(avalon) {
                avalon.define({
                    $id: "test",
                    callback1: function(e) {
                        alert(new Date - 0 + "  ctrl+1")
                        console.log(this)
                        e.preventDefault()
                    },
                    callback2: function(e) {
                        alert(new Date - 0 + "  ctrl+alt+f")
                        console.log(this)
                        e.preventDefault()
                    },
                    callback3: function() {
                        alert(this.innerHTML)
                    }
                })
                avalon.scan()
            })
        </script>
    </head>
    <body >
        <div id="aaa" ms-controller="test" >
            <textarea class="bbb" ms-hotkeys-ctrl+1="callback1">ctrl+1</textarea>
            <textarea class="bbb" ms-hotkeys-ctrl+alt+f="callback2">ctrl+alt+f</textarea>
            <p ms-click="callback3">普通的触发</p>

        </div>

    </body>
</html>